package com.alibaba.middleware.hsf;

import com.alibaba.middleware.hsf.guide.api.model.OrderEntryModel;
import com.alibaba.middleware.hsf.guide.api.model.OrderModel;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author weipeng2k 2017年12月27日 上午10:41:33
 */
public class Data {

    public static OrderModel gen() {
        OrderModel orderModel = new OrderModel();
        orderModel.setBuyerMemberId("weipeng");
        orderModel.setDiscount(1L);
        orderModel.setGmtCreate(new Date());
        orderModel.setGmtModified(new Date());
        orderModel.setId(1L);
        orderModel.setProductName("好东西");
        orderModel.setRealPayment(2L);
        orderModel.setSellerMemberId("seller");
        orderModel.setTotalPayment(3L);
        List<OrderEntryModel> orderEntryModelList = new ArrayList<OrderEntryModel>();
        orderModel.setOrderEntryList(orderEntryModelList);
        for (int i = 0; i < 10; i++) {
            OrderEntryModel orderEntryModel = new OrderEntryModel();
            orderEntryModel.setId((long) i);
            orderEntryModel.setOrderId((long) i);
            orderEntryModel.setPrice(2L);
            orderEntryModel.setQuantity(2D);
            orderEntryModel.setTitle("好");
            orderEntryModel.setUnit("个");
            orderEntryModelList.add(orderEntryModel);
        }
        return orderModel;
    }
}
